home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2001 November / november_2001.iso / Browsers / Netscape 6.1 / browser.xpi / bin / chrome / comm.jar / content / wallet / walletContextOverlay.xul < prev    next >
Encoding:
Extensible Markup Language  |  2001-03-21  |  3.5 KB  |  90 lines

  1. <?xml version="1.0"?>
  2.  
  3. <!--
  4.    The contents of this file are subject to the Netscape Public
  5.    License Version 1.1 (the "License"); you may not use this file
  6.    except in compliance with the License. You may obtain a copy of
  7.    the License at http://www.mozilla.org/NPL/
  8.     
  9.    Software distributed under the License is distributed on an "AS
  10.    IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  11.    implied. See the License for the specific language governing
  12.    rights and limitations under the License.
  13.     
  14.    The Original Code is Mozilla Communicator client code, released
  15.    March 31, 1998.
  16.    
  17.    The Initial Developer of the Original Code is Netscape
  18.    Communications Corporation. Portions created by Netscape are
  19.    Copyright (C) 1998-1999 Netscape Communications Corporation. All
  20.    Rights Reserved.
  21.    
  22.    Contributor(s): 
  23.   -->
  24.  
  25. <!DOCTYPE window SYSTEM "chrome://wallet/locale/walletContextOverlay.dtd">
  26.  
  27. <overlay id="walletContextOverlay"
  28.          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  29.  
  30.   <script type="application/x-javascript" src="chrome://wallet/content/walletOverlay.js"/>
  31.  
  32.   <script type="application/x-javascript">
  33.   <![CDATA[
  34.  
  35.     function initContextItems() {
  36.  
  37.         // Determine if capture should be displayed and enabled.
  38.         var captureState = getState(capture, 0);
  39.         showItem("context-capture", (captureState != hide));
  40.         setDisabledAttr("context-capture", (captureState == disable));
  41.  
  42.         // Determine if prefill should be displayed and enabled.
  43.         var prefillState = getState(prefill, 0);
  44.         showItem("context-prefill", (prefillState != hide));
  45.         setDisabledAttr("context-prefill", (prefillState == disable));
  46.  
  47.         // Display show-saved-dat if either prefill or capture is being displayed
  48.         showItem("context-formshow", captureState != hide || prefillState != hide);
  49.  
  50.         // Display separator if either prefill or capture is being displayed
  51.         showItem("context-separator", captureState != hide || prefillState != hide);
  52.     }
  53.  
  54.     // For some unexplainable reason, this overlay is loaded twice as can be demonstrated
  55.     // by uncommenting the following "dump" statement which will get displayed twice
  56.     //    dump("$$$$$$$$$$ HERE WE ARE IN walletContextOverlay.xul $$$$$$$$$$\n");
  57.     // As a consequence, the block-image item appears twice in the context menu.  To
  58.     // prevent that from happening, the "display:none" was added to the menuitem below
  59.  
  60.   ]]>
  61.   </script>         
  62.  
  63.   <!-- context menu -->
  64.   <popupset id="contentAreaContextSet" oncreate="initContextItems();"/>
  65.  
  66.   <popup id="contentAreaContextMenu">
  67.     <menuitem id="context-formshow"
  68.               label="&formshowCmd.label;"
  69.               accesskey=""
  70.               oncommand="formShow();"
  71.               style="display:none;"
  72.               insertafter="context-paste"/>
  73.     <menuitem id="context-capture"
  74.               label="&captureCmd.label;"
  75.               accesskey=""
  76.               oncommand="formCapture();"
  77.               style="display:none;"
  78.               insertafter="context-paste"/>
  79.     <menuitem id="context-prefill"
  80.               label="&prefillCmd.label;"
  81.               accesskey=""
  82.               oncommand="formPrefill();"
  83.               style="display:none;"
  84.               insertafter="context-paste"/>
  85.     <menuseparator id="context-separator"
  86.                    style="display:none;"
  87.                    insertafter="context-paste"/>
  88.   </popup>
  89. </overlay>
  90.